package com.wulian.user.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 
* @ClassName: UserWebConfiguration
* @Description: TODO(这里用一句话描述这个类的作用) 
* @author 马志豪
* @date 2019年9月12日 上午10:47:42 
*
 */
@Configuration("adminUserWebConfig")
@Primary
public class UserWebConfiguration implements WebMvcConfigurer {
    /**
     * 解决路径资源映射问题
     *
     * @param registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
//        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
//        registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
    }
}
